package com.example.bcvicse.com.service.impl;

import com.example.bcvicse.com.dao.ReceiveDAO;
import com.example.bcvicse.com.pojo.vo.CarData;
import com.example.bcvicse.com.service.ReceiveService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * @ClassName ReceiveImpl
 * @创建人 李劲松
 * @创建时间 2022/7/20 13:02
 * @描述
 */
@Service
public class ReceiveImpl implements ReceiveService {
    @Resource
    ReceiveDAO receiveDAO;
    @Override
    public int addBData(CarData carData) {
        return receiveDAO.addBData(carData.getId(),carData.getEnTime(),carData.getEnTollStationName()
        ,carData.getExTime(),carData.getExTollStationName(),carData.getVehicleId(),carData.getVehicleType(),carData.getFee(),new Date());
    }

    @Override
    public boolean selectById(String id) {
        return receiveDAO.selectById(id).size()>0;
    }

}
